{% load i18n %}

{% if page_obj.has_previous or page_obj.has_next %}
<div class="pagination">
  <span class="step-links">
    {% if page_obj.has_previous %}
    <a class="mx-1" href="?{{other_get_params}}&page=1"><i class="fas fa-angle-double-left"></i> {% trans "First" %} </a>
    <a class="mx-1" href="?{{other_get_params}}&page={{ page_obj.previous_page_number }}"><i class="fas fa-angle-left"></i> {% trans "Prev" %} </a>
    {% else %}
    <span class="mx-1"><i class="fas fa-angle-double-left"></i> {% trans "First" %} </span>
    <span class="mx-1"><i class="fas fa-angle-left"></i> {% trans "Prev" %} </span>
    {% endif %}

    <span class="current mx-2">
      {% blocktrans with page_number=page_obj.number num_pages=page_obj.paginator.num_pages %}
      Page {{ page_number }} of {{ num_pages }}
      {% endblocktrans %}
    </span>

    {% if page_obj.has_next %}
    <a class="mx-1" href="?{{other_get_params}}&page={{ page_obj.next_page_number }}"> {% trans "Next" %} <i class="fas fa-angle-right"></i></a>
    <a class="mx-1" href="?{{other_get_params}}&page={{ page_obj.paginator.num_pages }}"> {% trans "Last" %} <i class="fas fa-angle-double-right"></i></a>
    {% else %}
    <span class="mx-1"> {% trans "Next" %} <i class="fas fa-angle-right"></i></span>
    <span class="mx-1"> {% trans "Last" %} <i class="fas fa-angle-double-right"></i></span>
    {% endif %}
  </span>
</div>
{% endif %}
